package cn.itsource.feign.client;


import cn.itsource.doc.CourseDoc;
import cn.itsource.feign.fallback.ESFeignClientFactory;
import cn.itsource.hrm.query.CourseQuery;
import cn.itsource.hrm.utils.AjaxResult;
import cn.itsource.hrm.utils.PageList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

//服务名和拖地方法
@FeignClient(value = "es-server",fallbackFactory = ESFeignClientFactory.class)
public interface ESFeignClient {

    @RequestMapping(value = "/es/onIineCourse",method = RequestMethod.POST)
    AjaxResult onLineCourse(@RequestBody CourseDoc courseDoc);

    @RequestMapping(value = "/es/offLineCourse",method = RequestMethod.POST)
    AjaxResult offLineCourse(@RequestBody Long id);

    @RequestMapping(value = "/es/searchCourse",method = RequestMethod.POST)
    public PageList<CourseDoc> searchCourse(@RequestBody CourseQuery courseQuery);
}
